package com.alibaba.cloud.base.api.serve;

import com.alibaba.cloud.base.business.user.domain.LoginUser;
import com.alibaba.cloud.base.business.user.service.LoginUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserServe {
    private static final Logger LOGGER = LoggerFactory.getLogger(UserServe.class);

    @Autowired
    private LoginUserService userService;

    @GetMapping("/get/{username}")
    public LoginUser getLoginUser(@PathVariable("username") String username) {

        return userService.getLoginUserByUsername(username);
    }

}
